{% extends 'SonataUserBundle:Admin/Core:user_block.html.twig' %}

{% block user_block %}
    {% if app.user %}
        <li class="user-header bg-light-blue">
            <img src="{{ asset('img/default_avatar.png') }}" class="img-circle" alt="Avatar">
            <p>{{ app.user }}</p>
        </li>
        <li class="user-footer">
            <div class="pull-right">
                {% if is_granted('ROLE_PREVIOUS_ADMIN') and sonata_user.impersonating %}
                    <a href="{{ url(sonata_user.impersonating.route, sonata_user.impersonating.parameters| merge({'_switch_user': '_exit'})) }}" class="btn btn-default btn-flat">(exit)</a>
                {% endif %}
                <a href="{{ url('sonata_user_admin_security_logout') }}" class="btn btn-default btn-flat"><i class="fa fa-sign-out fa-fw"></i>{{ 'user_block_logout'|trans({}, 'SonataUserBundle') }}</a>
            </div>
        </li>
    {% endif %}
{% endblock %}
